﻿using System;
using System.Data;
using System.Collections.Generic;
using liaowa2.Interface.Manager;
using liaowa2.Entity.DataModel;
using liaowa2.Dao.Manager;
using liaowa2.Entity.DTO;
using liaowa2.Entity.Web;
using liaowa2.Entity.DTO.ManagerRole;

namespace liaowa2.Impl.Manager
{
    /// <summary>
    /// 系统导航菜单
    /// </summary>
    public class ManagerRoleImpl : IManagerRoleInterface
    {
        public bool Add(ManagerRole model, List<ManagerRoleValue> list)
        {
            return ManagerRoleDao.Add(model, list);
        }
        public ManagerRoleDTO GetRoleDTO(int id)
        {
            return ManagerRoleDao.GetRoleDTO(id);
        }

        public EntityPage<ManagerRoleDto> GetAll(GetAllInput input)
        {
            return ManagerRoleDao.GetAll(input);
        }

        public bool Update(ManagerRole model, List<ManagerRoleValue> list)
        {
            return ManagerRoleDao.Update(model, list);
        }

        #region  生成代码
        /// <summary>
        /// 是否存在该记录
        /// </summary>
        public bool Exists(string where)
        {
            return ManagerRoleDao.Exists(where);
        }

        /// <summary>
        /// 增加一条数据
        /// </summary>
        public int Add(ManagerRole model)
        {
            return ManagerRoleDao.Add(model);

        }

        /// <summary>
        /// 更新一条数据
        /// </summary>
        public bool Update(ManagerRole model)
        {
            return ManagerRoleDao.Update(model);
        }

        /// <summary>
        /// 删除一条数据
        /// </summary>
        public bool Delete(int id)
        {
            return ManagerRoleDao.Delete(id);
        }
        /// <summary>
        /// 批量删除一批数据
        /// </summary>
        public bool DeleteList(string idlist)
        {
            return ManagerRoleDao.DeleteList(idlist);
        }

        /// <summary>
        /// 得到一个对象实体
        /// </summary>
        public ManagerRole GetModel(int id)
        {
            return ManagerRoleDao.GetModel(id);
        }



        /// <summary>
        /// 根据条件获得数据列表
        /// </summary>
        public List<ManagerRole> GetList(string strWhere)
        {
            return ManagerRoleDao.GetList(strWhere);
        }
        /// <summary>
        /// 获得前几行数据
        /// </summary>
        public List<ManagerRole> GetList(int Top, string strWhere, string filedOrder)
        {
            return ManagerRoleDao.GetList(Top, strWhere, filedOrder);
        }

        /// <summary>
        /// 获取记录总数
        /// </summary>
        public int GetRecordCount(string strWhere)
        {
            return ManagerRoleDao.GetRecordCount(strWhere);
        }

        /// <summary>
        /// 获得所有数据列表
        /// </summary>
        public List<ManagerRole> GetAllList()
        {
            return ManagerRoleDao.GetList("");
        }

        /// <summary>
        /// 分页获取数据列表
        /// </summary>
        public List<ManagerRole> GetListByPage(string strWhere, string orderby, int startIndex, int endIndex, ref int count)
        {
            return ManagerRoleDao.GetListByPage(strWhere, orderby, startIndex, endIndex, ref count);
        }

        #endregion
    }
}

